************************************************************************
************************************************************************
************************************************************************
** Replication Data for:
** 
** Andy J. Rottman, Christopher J. Fariss and Steven C. Poe
** "The Path to Asylum in the US and the Determinants for Who Gets In and Why"
** International Migration Review (IMR)
** Volume 43 Number 1 (Spring 2009): 3�34
**
** contact author: Christopher J. Fariss
** contact e-mail: cjf0006@gmail.com; cfariss@ucsd.edu
** replication data available at: http://dvn.iq.harvard.edu/dvn/dv/CJFariss
** replication data is also at: http://dss.ucsd.edu/~cfariss/
** 
** The supplemental appendix contains detailed replication information
** and is available at: http://www3.interscience.wiley.com/journal/122222872/suppinfo
**
** All commands were run in Stata 9.2
**
** All models contained within this replication file correspond to the 
** models and tables presented in the text of the article.
**
************************************************************************
************************************************************************
************************************************************************

** set crosssection and time variable for panel data 
**
tsset cowcode year



** create descriptive labels for each variable
**
label variable cowcode "Correlates of War code"
label variable country "Correlates of War country name" 
label variable year "Year" 
label variable grant_officer "Asylum officer acceptance rate"
label variable grant_judge "Immigration judge acceptance rate"
label variable pts_state_lag "Violations of Physical Integrity (PTS) t-1"
label variable polity2_lag "Democracy (Polity2) t-1"
label variable mlagdummy "US military aid t-1"
label variable log_trade2004 "US Trade (ln $1000US 2004) t-1"
label variable sanctions "Sanctions"
label variable english98 "English language/culture"
label variable arabic98 "Arabic language/culture"
label variable spanish98 "Spanish language/culture"
label variable top10undoc "Top 10 undocumented migrant sending countries"
label variable post2001 "Years after 9/11 (2002-2004)"
label variable panel_officer "number of asylum officer observations in country-year panel"
label variable panel_judge "number of immigration judge observations in country-year panel"
label variable casfiled "number of cases filed with an asylum officer by country of origin"
label variable hreciev "cases received at immigration court by country of origin" 




************************************************************************
**
** TABLE 1
** Model 1 Asylum Officer 1999-2004
xtpcse grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions top10undoc post2001 if panel_officer>4 & panel_officer !=. & panel_judge>4 & panel_judge !=. & grant_judge !=.  & casfiled>9 & hreciev>9,corr(ar1) pairwise 

** Model 1 Immigration Judge 1999-2004
xtpcse grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions top10undoc post2001  if panel_officer>4 & panel_officer !=. & panel_judge>4 & panel_judge !=. & grant_judge !=.  & casfiled>9 & hreciev>9,corr(ar1) pairwise 

** Model 2 Asylum Officer 1999-2004
xtpcse grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc post2001 if panel_officer>4 & panel_officer !=. & panel_judge>4 & panel_judge !=. & grant_judge !=.  & casfiled>9 & hreciev>9,corr(ar1) pairwise 

** Model 2 Immigration Judge 1999-2004
xtpcse grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc post2001 if panel_officer>4 & panel_officer !=. & panel_judge>4 & panel_judge !=. & grant_judge !=.  & casfiled>9 & hreciev>9,corr(ar1) pairwise 

generate measure=.
replace measure = 1 if e(sample)


************************************************************************
**
** TABLE 2
** Model 2a Asylum Officer 1999-2001
xtpcse grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==0 & measure==1,corr(ar1) pairwise 

** Model 2a Immigration Judge 1999-2001
prais grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==0 & measure==1,robust 

** Model 2b Asylum Officer 2001-2004
xtpcse grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==1 & measure==1,corr(ar1) pairwise 

** Model 2b Immigration Judge 2002-2004
prais grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==1 & measure==1,robust 


************************************************************************
**
** TABLE 3
** Model 3a Asylum Officer 1999-2001
prais grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==0 & measure==1,robust 

** Model 3a Immigration Judge 1999-2001
prais grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==0 & measure==1,robust 

** Model 3b Asylum Officer 2001-2004
prais grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==1 & measure==1,robust 

** Model 3b Immigration Judge 2002-2004
prais grant_judge grant_officer pts_state_lag polity2_lag mlagdummy  log_trade2004 sanctions english98 arabic98 spanish98 top10undoc if post2001==1 & measure==1,robust




 
